Q: Why do I get a "protocol violation" when I try to rcp something?
A: In order for the rcp command to work correctly, your .cshrc must not output anything via the cshell if that cshell is not "interactive." It turns out that rcp runs a non-interactive cshell on the remote machine in order to exec the remote copy operation -- a pretty dumb way of doing things, but that's the way it does remote file name expansion and the like. Any extra output from the cshell while rcp is trying to run the remote copy confuses rcp and you end up with the "protocol violation" messages from rcp.
The way to determine if the cshell is interactive from your .cshrc is to check if a prompt is defined. In fact, the most common violation of the no output rule is to assign a prompt when there wasn't one to begin with. The second most common violation is setting the cshell "time" variable. The "best" format for your .cshrc is something like this:
set path=( YOUR PATH )
umask 022 # YOUR UMASK
if (${?prompt} ) then
# just about everything else
# ESPECIALLY anything like setting your prompt
# setting the cshell "time" variable, etc
endif
It's a GOOD idea to set your path and umask unconditionally in your .cshrc. Setting the umask makes files rcp'ed to a remote machine end up with the protections you like, and setting your path allows rsh'es to find the same things it would locally.